import Vue from 'vue'
// 导入组件
import ElImageViewer from 'element-ui/packages/image/src/image-viewer'
const ImageViewer = Vue.extend(ElImageViewer)

export function imageView(images) {
  const viewImage = new ImageViewer({
    propsData: {
      urlList: images,
      onClose: function() {
        document.body.removeChild(viewImage.$mount().$el)
        viewImage.$destroy()
      }
    }
  })
  document.body.appendChild(viewImage.$mount().$el)
}
